package org.comeday.idempotent.controller;

import org.comeday.idempotent.annotation.Idempotent;
import org.comeday.idempotent.vo.Order;
import org.comeday.idempotent.vo.RequestData;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Program Name: spring_study
 * <p>
 * Description:
 * <p>
 * Created by hkrong on 2024/11/24 17:23
 *
 * @author hkrong
 * @version 1.0
 */
@RestController
@RequestMapping("/order")
public class OrderController {

    @RequestMapping("saveOrder")
    @Idempotent(name = "requestData",type = RequestData.class,field = "token")
    public String saveOrder(@RequestBody RequestData<Order> requestData) {
        return "success";
    }
}
